package net.wwang.blog.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.sql.Timestamp;


@EntityListeners(AuditingEntityListener.class)
@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "setting")
public class Setting {

  @Id
  @Column(name = "id")
  private String id;
  @Column(name = "`key`")
  private String key;
  @Column(name = "`value`")
  private String value;
  @CreatedDate
  @Column(name = "create_time")
  private Timestamp createTime;
  @LastModifiedDate
  @Column(name = "modify_time")
  private Timestamp updateTime;

}
